package com.example.springbootmybatis.mapper;

import com.example.springbootmybatis.domain.Blog;
import com.example.springbootmybatis.domain.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: springboot_test
 * @description:
 * @author: Mr. Wu
 * @create: 2025-01-08 10:12
 **/
@Mapper
public interface BlogMapper {

    public Blog selectBlog(@Param("id") Integer id);

    public Blog selectBlogAndPost(@Param("id") Integer id);

    public List<Blog> selectBlogAndPosts(@Param("id") Integer id);

    public List<Blog> findActiveBlogWithTitleLike(@Param("title") String title);

    public List<Blog> selectIfTest01(@Param("title") String title);

    public boolean updateBlog(Blog blog);

    public List<Blog> selectBlogIn(List<Integer> ids);

    public boolean deleteBlogIds(List<Integer> ids);

}
